#include <iostream>
#include <string>
#include <vector>

/**
 * Luogu P1018: Maximal Product
 */

struct BigInt {
    std::vector<uint8_t> digits;

    BigInt() {}

    BigInt(const std::string &str) {
        for (int i = str.length() - 1; i >= 0; i--)
            digits.push_back(str[i] - '0');
    }

    BigInt(const std::vector<uint8_t> &digits) : digits(digits) {
        trim();
    }

    BigInt operator*(const BigInt &other) const {
        size_t sumLen = digits.size() + other.digits.size();
        std::vector<uint8_t> result(sumLen, 0);
        uint8_t carry = 0;
        for (int r = 0; r < sumLen - 1; r++) {
            uint16_t sum = carry;
            for (int i = 0; i < digits.size(); i++) {
                uint8_t a = digits[i];
                int j = r - i;
                if (j >= other.digits.size()) continue;
                uint8_t b = other.digits[j];
                sum += a * b;
            }
            result[r] = sum % 10;
            carry = sum / 10;
        }
        result[sumLen - 1] = carry;
        return BigInt(result);
    }

    bool operator<(const BigInt &other) const {
        if (digits.size() != other.digits.size())
            return digits.size() < other.digits.size();
        for (int i = digits.size() - 1; i >= 0; i--)
            if (digits[i] != other.digits[i])
                return digits[i] < other.digits[i];
        return false;
    }

    void print() const {
        for (int i = digits.size() - 1; i >= 0; i--) printf("%d", digits[i]);
        printf("\n");
    }

    void trim() {
        while (digits.size() > 0 && digits.back() == 0) digits.pop_back();
    }
};

int main() {
    // Input
    int n, k;
    scanf("%d  %d\n", &n, &k);
    std::string str;
    std::getline(std::cin, str);

    // Use DP to find maximal product
    std::vector<BigInt> buf(1, BigInt());  // zero cut
    for (int l = 1; l <= n; l++) buf.push_back(BigInt(str.substr(0, l)));
    for (int c = 1; c <= k; c++) {
        std::vector<BigInt> newBuf(n + 1, BigInt());
        for (int e = c; e <= n; e++) {
            BigInt max("1");
            for (int s = c; s < e; s++) {
                BigInt prod = buf[s] * BigInt(str.substr(s, e - s));
                if (max < prod) max = prod;
            }
            newBuf[e] = max;
        }
        buf = newBuf;
    }
    buf[n].print();

    return 0;
}